#include <stdio.h>
#include <unistd.h>

int main(){
  //int count = 1;
  //while(1){
    //printf("running?,%d\n",count++);
    //sleep(2);
  //}
    pid_t id = fork();
    if(id == 0){
      while(1){
        printf("子进程,pid:%d,ppid:%d\n",getpid(),getppid());
        sleep(1);
      }
    }
    else{
      while(1){
        printf("父进程,pid:%d,ppid:%d\n",getpid(),getppid());
        sleep(1);
      }
    }
    return 0;
}
